<?php

class adminSlideshow extends Controller
{
    public function index()
    {
    	// Verify if admin is logge in, otherwise redirect out
    	Helper::verifyAdminLoggedIn();
    	
	    //print "Categories Are : <pre>" . print_r($categories,true) . "</pre>";exit;
        // $amount_of_digitalContents = $this->model->getamoutDigitalContent();
	
        // load views
        require APP . 'views/admin_templates/header.php';
        require APP . 'views/adminSlideshow/index.php';
        require APP . 'views/admin_templates/footer.php';
    }

    public function addslideshow()
    {
		$result = 0;
    	// Verify if admin is logge in, otherwise redirect out
    	Helper::verifyAdminLoggedIn();
    	
        if (isset($_POST["submit_addslideshow"])) {
			$image = $this->model->uploadFile($_FILES);
            $this->model->addslideshow($image);         
		}
		
		header('location: ' . URL . 'adminSlideshow?result='.$result);
	}
	
	

}
